<html>
  <head>
    <title>Edit User</title>
   	<script src="./lib/jquery.js" ></script>
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<link rel="stylesheet" href="./lib/jquery.mobile-1.1.1.min.css" />
	<script src="./lib/jquery-1.7.1.min.js"></script>
	<script language="JavaScript" SRC="config.js"></script>
	<script src="./lib/jquery.mobile-1.1.1.min.js"></script>
	<script type="text/javascript" charset="utf-8">
 function get(){
	 var form=document.forms["form"];
	 if(form.title.value=='')
	 {
	 alert("Title must not empty");
	 }
 else if(form.body.value=='')
	 {
	 alert("Body must not empty");
	 }
 else 
	 {
 		 alert("get is called");
        $.post('http://'+serverip+'/socialengine/mobileservice/announcement/postnewannouncement', {title:form.title.value,body: form.body.value},
            function(output){
               alert(output.result);
            },"json");
        window.location.href = "announcement.html";
	 }
       
    };
    </script>
  </head>
<body>

<div data-role="page" id="header">
<div data-role="header">
<a href="index.html" data-role="button" data-icon="home" data-iconpos="notext" rel="external">Home</a>
<h1>Post Announcement</h1>
</div>
<div data-role="content">
<form name="form" id="form">
	<p>Title</p>
    <input type="text" name="title" id="title">
    <p>Content</p>
    <textarea name="body" id="body"  rows="6" cols="20"></textarea>
    <input type="button" value="Post Announcement" onClick="get();">
</form>
</div>
<div data-role="footer">
<h4>Footer</h4>

</div>
</body>
</html>